package com.huirui.server.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单项表
 *
 * @TableName t_order_detail
 */
@TableName(value = "t_order_detail")
@Data
public class OrderDetail implements Serializable {
    /**
     * 订单项ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单ID
     */
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 商品规格ID
     */
    @TableField(value = "product_specification_id")
    private Long productSpecificationId;

    /**
     * 商品规格单价
     */
    @TableField(value = "product_price")
    private BigDecimal productPrice;

    /**
     * 购买数量
     */
    @TableField(value = "quantity")
    private Integer quantity;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}